package com.core.common.gen;

/**
 * @program: kuntail
 * @description:
 * @author: honglei
 * @create: 2022-06-07 16:39
 */
public class Test {

    private void Test1() {
        int a=1;
        int b = 1;
        a = ++a + ++a;
        System.out.println();
        System.out.println("a = ++a + ++a");
        System.out.println(a);
        System.out.println("(++b)+(++b) ");
        System.out.println(++b+ ++b);
    }
    private void Test2() {
        int a=1;
        int b = 1;
        a = ++a+ a++;
        System.out.println();
        System.out.println("a=++a+ a++;");
        System.out.println(a);
        System.out.println("++b+ b++ ");
        System.out.println(++b+ b++);
    }
    private void Test3() {
        int a=1;
        int b = 1;
        a = a++ + a++;
        System.out.println();
        System.out.println("a=a++ + a++");
        System.out.println(a);
        System.out.println("b++ + b++");
        System.out.println(b++ + b++);
    }

    private void Test4() {
        int a = 1;
        a=-a++;
        int b = 1;
        b=-(b++);
        System.out.println();
        System.out.println("a=-a++ ");
        System.out.println(a);
        System.out.println("b=-(b++)");
        System.out.println(b);
    }

    public static void main(String[] args) {
        Test test=new Test();
        test.Test1();
        test.Test2();
        test.Test3();
        test.Test4();
    }
}
